package com.heiye.quiz.api.api;

import com.heiye.framework.common.response.Response;
import com.heiye.quiz.api.constant.ApiConstant;
import com.heiye.quiz.api.dto.req.CheckNoteIsExistReqDTO;
import com.heiye.quiz.api.dto.req.FindQuizCreatorReqDTO;
import com.heiye.quiz.api.dto.resp.CheckQuizIsExistRespDTO;
import com.heiye.quiz.api.dto.resp.FindQuizCreatorRespDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

/**
 * @author: heiye
 * @date: 2025/04/15 上午11:58
 * @version: v1.0.0
 * @description: TODO
 */
@FeignClient(name = ApiConstant.QUIZ_NAME)
public interface QuizFeignApi {

    String PREFIX = "/quiz";

    /**
     * 查询是否笔记存在
     *
     * @param checkNoteIsExistReqDTO
     * @return
     */
    @PostMapping(value = PREFIX + "/checkNoteIsExist")
    Response<CheckQuizIsExistRespDTO> checkNoteIsExist(@RequestBody @Validated CheckNoteIsExistReqDTO checkNoteIsExistReqDTO);

    /**
     * 查询问题作者信息
     *
     * @param findQuizCreatorReqDTO
     * @return
     */
    @PostMapping(value = PREFIX + "/findQuizCreator")
    Response<FindQuizCreatorRespDTO> findQuizCreator(@RequestBody @Validated FindQuizCreatorReqDTO findQuizCreatorReqDTO);
}
